<template>
  <div class="basicInformation_modal">
    <dt-modal-edit
      ref="edit"
      :title="title"
      :label-width="130"
      okText="确定"
      :width="600"
      @ok="saveStataus"></dt-modal-edit>
  </div>
</template>
<script>
  import buildingApi from '@/biz/buildingManagement/basicInfo'
  import basicStatusOpt from '../opt/basicStatusOpt'
  export default {
    data() {
      return {
        info: {},
        title: '编辑案场信息'
      }
    },
    methods: {
      show(data) {
        console.log(data)
        this.info = Object.assign({}, this.info, data)
        this.$refs.edit.show(basicStatusOpt.options(this), this.info)
      },
      hide() {
        this.$refs.edit.hide()
      },
      //字段修改保存
      saveStataus() {
        this.info.housesId = this.$dt.buildInfo().housesId
        buildingApi.housesEditStatus(this.info).then((res) => {
          console.log(this.info, '3333')
          this.$Message.success('修改成功')
          this.$emit('onChangeData')
          this.hide()
        })
      }
    },
    mounted() {}
  }
</script>
<style lang="scss" scoped></style>
